/// 版本更新数据
class VersionData {
  int? newVersionFlag;
  NewVersionInfo? newVersionInfo;

  VersionData({this.newVersionFlag, this.newVersionInfo});

  VersionData.fromJson(Map<String, dynamic> json) {
    if (json["newVersionFlag"] is int) {
      newVersionFlag = json["newVersionFlag"];
    }
    if (json["newVersionInfo"] is Map) {
      newVersionInfo = json["newVersionInfo"] == null
          ? null
          : NewVersionInfo.fromJson(json["newVersionInfo"]);
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["newVersionFlag"] = newVersionFlag;
    if (newVersionInfo != null) {
      _data["newVersionInfo"] = newVersionInfo?.toJson();
    }
    return _data;
  }
}

class NewVersionInfo {
  String? apkSize;
  String? updateContent;
  int? forceUpdateFlag;
  String? versionName;
  String? url;

  NewVersionInfo(
      {this.apkSize,
      this.updateContent,
      this.forceUpdateFlag,
      this.versionName,
      this.url});

  NewVersionInfo.fromJson(Map<String, dynamic> json) {
    if (json["apkSize"] is String) {
      apkSize = json["apkSize"];
    }
    if (json["updateContent"] is String) {
      updateContent = json["updateContent"];
    }
    if (json["forceUpdateFlag"] is int) {
      forceUpdateFlag = json["forceUpdateFlag"];
    }
    if (json["versionName"] is String) {
      versionName = json["versionName"];
    }
    if (json["url"] is String) {
      url = json["url"];
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> _data = <String, dynamic>{};
    _data["apkSize"] = apkSize;
    _data["updateContent"] = updateContent;
    _data["forceUpdateFlag"] = forceUpdateFlag;
    _data["versionName"] = versionName;
    _data["url"] = url;
    return _data;
  }
}
